<template>
  <div class="dashboard-container">
    <div class="dashboard-editor-container">

      <el-row style="background:#fff;padding:16px 16px 0;margin-bottom:20px;">
        <bar-chart />
      </el-row>

      <el-row :gutter="20">
        <el-col :xs="24" :sm="24" :lg="8">
          <div class="chart-wrapper">
            <radar-chart />
          </div>
        </el-col>
        <el-col :xs="24" :sm="24" :lg="8">
          <div class="chart-wrapper">
            <pie-chart />
          </div>
        </el-col>
        <el-col :xs="24" :sm="24" :lg="8">
          <div class="chart-wrapper">
            <pie />
          </div>
        </el-col>
      </el-row>
    </div>
  </div>
</template>

<script>
import BarChart from '@/components/Echarts/BarChartTeacher'
import RadarChart from '@/components/Echarts/RadarChartTeacher'
import PieChart from '@/components/Echarts/PieChartTeacher'
import Pie from '@/components/Echarts/PieTeacher'

export default {
  name: 'Dashboard',
  components: {
    BarChart,
    RadarChart,
    PieChart,
    Pie
  },
  data() {
    return {
      dataType: 'visitis'
    }
  },
  methods: {
    handleSetLineChartData(type) {
      this.dataType = type
    }
  }
}
</script>

<style rel="stylesheet/scss" lang="scss" scoped>
  .dashboard-editor-container {
    padding: 20px;
    background-color: rgb(240, 242, 245);
    position: relative;

    .github-corner {
      position: absolute;
      top: 0;
      border: 0;
      right: 0;
    }

    .chart-wrapper {
      background: #fff;
      padding: 16px 16px 0;
      margin-bottom: 20px;
    }
  }

  @media (max-width:1024px) {
    .chart-wrapper {
      padding: 8px;
    }
  }
</style>
